package com.lepu.app.usercenter.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

class BeanFeedbackChild {
	public String ReplyTime;// 回复时间
	public String ReplyContent;// 回复内容
	public String ReplyUserID;// 回复id
}

public class BeanFeedback {

	public String AdviceID;// 意见id
	public String AdviceContent;// 内容
	public String UserID;// 提意见id
	public String RecordCreateTime;// 时间
	public String ContactInfo;// 联系信息
	public String ReplyStatus;// 回复状态

	public ArrayList<BeanFeedbackReply> ReplyList;

	public static ArrayList<BeanFeedback> parseJsonData(String dataString) {
		String result = "";
		try {
			JSONObject jsonObject = new JSONObject(dataString);
			JSONObject obj1 = (JSONObject) jsonObject.get("Result");
			JSONArray jsonArray = obj1.getJSONArray("ListInfo");

			result = jsonArray.toString();
		} catch (JSONException e) {
			e.printStackTrace();
		}

		Gson gson = new Gson();
		ArrayList<BeanFeedback> testArraylist = gson.fromJson(result,
				new TypeToken<List<BeanFeedback>>() {
				}.getType());
		return testArraylist;
	}
}
